(w->base_line_number): Rework the way we flush the cache
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 4 Feb 2024 17:50:55 +0000 (12:50 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 4 Feb 2024 17:50:55 +0000 (12:50 -0500)
commit57024e1e9314501b103a4d36b9b166761a2ad756
tree1e60e5831cc5631fdabc8ae26951260326d27220
parenta4587646fabf2b7f0cb19a7e0bee090f9106a73a
(w->base_line_number): Rework the way we flush the cache

* src/xdisp.c (BASE_LINE_NUMBER_VALID_P): New macro.
(try_scrolling): Use it.
(redisplay_window, Fformat_mode_line): Use it to flush the
base_line_number (if it's stale) once at the beginning.
(decode_mode_spec): Don't use (or set) `w->start` and
`w->base_line_number` when operating on another buffer!
src/xdisp.c